<?php

declare (strict_types=1);

namespace App\Common\Modular\Data\Model;

use Core\Basics\BasicsModel;
use Zms\HyperfCasts\StrtotimeCasts;

/**
 * /**
 * @property int $id ID
 * @property string $title 标题
 * @property string $position 显示位置
 * @property string $url 跳转链接
 * @property string $image 图片
 * @property string $color 轮播色调
 * @property int $start 开始时间
 * @property int $end 结束时间
 * @property int $sort 排序
 * @property int $hits 点击量
 * @property int $status 显示状态
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 */
class BannerModel extends BasicsModel
{
    /**
     * The table associated with the model.
     *
     * @var null|string
     */
    protected ?string $table = 'data_banner';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected array $fillable = [];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected array $casts = [
        'id' => 'int',
        'start' => StrtotimeCasts::class,
        'end' => StrtotimeCasts::class,
        'sort' => 'integer',
        'hits' => 'integer',
        'status' => 'integer',
        'created_at' => StrtotimeCasts::class,
        'updated_at' => StrtotimeCasts::class
    ];
}
